1. Field of the Invention
The present invention relates to a position detector which may be used to perform position measurement in a machine tool or the like and, more particularly, to such a position detector of the absolute type.
2. Description of the Related Art
An absolute-type position detector generally employs a Gray code as the code pattern. The use of the Gray code entails some problems when the absolute range is widened. The widening results in a corresponding increase in the number of tracks. Accordingly, a problem arises in that the sectional area of the position detector is increased. Another problem is that the number of the tracks requires light-receiving a corresponding number of systems electric circuits, etc. In view of these problems, a position detector capable of obtaining an absolute position with a small number of the tracks, has been proposed.
FIG. 1 is a block diagram showing an example of a conventional position detector capable of obtaining an absolute position with a small number of tracks. Light emitted from a light source section including a light-emitting element 101 and a collimator lens 102 passes to a first scale 103. The first scale 103 has a plurality of grating tracks, in which light-transmitting portions and non-light-transmitting portions are repeated at certain pitches. The first scale 103 is movable in the longitudinal direction thereof or in a direction perpendicular to the surface of the drawing.
FIG. 2 shows an example of the construction of the grating tracks provided in the first scale 103. The relationship between the pitches of the grating tracks is expressed by the ratio 1:N (N being an integer greater than three). More specifically, the pitches P1, P2 and P3 of grating tracks t1, t2 and t3 (in three rows) have a mutual relationship expressed as: P1:P2:P3=1:10:100. Light transmitted through the light-transmitting portions of the first scale 103 enters a second scale 104, within a reading unit 106, which is formed with grating tracks t1, t2 and t3 similar to those of the first scale 103. Light transmitted through the light-transmitting portions of the second scale 104 enters photodectors 1051, 1052 and 1053, also within the reading unit 106, which respectively correspond to the grating tracks t1, t2 and t3 of the second scale 104. The photodetectors 1051, 1052 and 1053 convert the received light into electrical signals SS1, SS2 and SS3, respectively, and send the signals to signal interpolation circuits 1111, 1112 and 1113, respectively, which form a part of a signal processing circuit 110.
Each of the signal interpolation circuits 1111, 1112 and 1113 subjects the sent electrical signal SS1, SS2 or SS3 to interpolation-dividing with a value which is within the pitch of the grating track t1, t2 or t3 of the first scale 103 and which is above the ratio N of the pitch of the grating track t1, t2 or t3. Thus, the signal interpolation circuits 1111, 1112 and 1113 respectively obtain items of data SP1, SP2 and SP3 on the absolute position and within one grating pitch, which data are sent to a data processing logic circuit 112 forming another part of the signal processing circuit 110. The data processing logic circuit 112 combines the absolute position data SP1, SP2 and SP3 within one grating pitch with each other, and outputs the result of the combination as absolute position data SP on the amount of movement of the first scale 103. In order to assure that the items of the absolute position data within one grating pitch are combined without any error, the data processing logic circuit 112 has a certain determination function for the determining, with respect to the absolute position data in the vicinity of a boundary between one-grating-pitch divisions, whether or not a carry to the higher-order or lower-order division should be effected. The range within which the position detector 100 detects an absolute position corresponds to the value of the maximum of the pitches of a plurality of the grating tracks.
The above-described position detector 100 outputs correct absolute position data when the first scale 103 and the reading unit 106 move relative to each other while they remain in their desired position. However, when a variation in the position has occurred, in which the first scale 103 and the reading unit 106 have rotated relative to each other about a normal perpendicular to the scale surface, the items of the absolute position data from the grating tracks having different pitches may not be properly combined together. This may result in erroneous absolute position data being outputted. When, as shown in FIG. 2, the reading unit 106 has slightly rotated relative to the first scale 103 in the direction indicated by the arrows to be positioned as indicated by the broken lines, the phases of the grating tracks t1 and t2 in the longitudinal direction thereof deviate by one half of the pitch P1 (P1/2), thereby making it impossible to properly combine positional data. As a result, the absolute position data obtained by the data processing logic circuit 112 in this case has, as compared with data obtainable in the case where a relative movement has occurred between the first scale 103 and the second scale 104 while they are in their desired position, an omission corresponding to the pitch P1 of the grating track t1. Thus, the occurrence of a variation in the position of the reading unit 106 relative to the first scale 103 entails the problem of reducing the reliability of a combination of the absolute position data. Conversely, in order to ensure the reliability, it is necessary that the straightness of the machine, etc. on which the position detector is mounted, be controlled, and this is another problem.